Interactive semi-automatic test case maintenance

ABSTRACT

Embodiments of the invention relate to test case maintenance for user interfaces. In one embodiment, user source and test cases are linked for test case maintenance. A link is determined to have been created between a user interface and at least one test script. The test script includes a set of test instructions. The user interface includes a set of user interface elements. Each test instruction is run against the user interface. Mapping information for each test instruction is generated. A change is determined to have occurred in at least one of the user interface and the test script. In response to a change having occurred to the user interface, at least one test instruction affected by the change is identified. In response to a change having occurred to the test script, at least one user interface element affected by the change to the test script is identified.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is continuation of and claims priority from U.S. patentapplication Ser. No. 13/149,438 filed on May 31, 2011; the entiredisclosure is herein incorporated by reference in its entirety. Thisapplication is also related to the inventors' U.S. patent applicationSer. No. 13/149,393 now U.S. Pat. No. 8,799,866, which was filed on May31, 2011 and is commonly assigned herewith to International BusinessMachines Corporation. This related application is incorporated herein byreference in its entirety.

BACKGROUND

The present invention generally relates to interface development, andmore particularly relates to test case maintenance for user interfaces.

BRIEF SUMMARY

Embodiments of the invention relate to test case maintenance for userinterfaces. In one embodiment, a method is disclosed. The methodcomprises determining that a link has been created between a userinterface and at least one test script. The test script comprises a setof test instructions. The user interface comprises a set of userinterface elements. Each test instruction in the set of test instructionis run against the user interface. A set of mapping information for eachtest instruction in the set of test instructions is generated inresponse to the running. The set of mapping information identifies anassociation between the test instruction and at least one user interfaceelement in the set of user interface elements. A change is determined tohave occurred in at least one of the user interface and the test script.In response to a change having occurred to the user interface, at leastone test instruction affected by the change to the user interface isidentified based on the set of mapping information. In response to achange having occurred to the test script, at least one user interfaceelement affected by the change to the test script is identified based onthe set of mapping information.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying figures where like reference numerals refer toidentical or functionally similar elements throughout the separateviews, and which together with the detailed description below areincorporated in and form part of the specification, serve to furtherillustrate various embodiments and to explain various principles andadvantages all in accordance with the present invention, in which:

FIG. 1 is a block diagram illustrating one example of an operatingenvironment comprising user interface development and testingenvironment according to one embodiment of the present invention;

FIG. 2 illustrates one example of the user interface development andtesting environment of FIG. 1 being presented to a user according to oneembodiment of the present invention;

FIG. 3 illustrates one example of a conflict view of the user interfacedevelopment and testing environment of FIG. 1 according to oneembodiment of the present invention;

FIG. 4 illustrates one example of a user being suggested syntax forwriting a test script according to one embodiment of the presentinvention;

FIG. 5 illustrates a more detailed view of an architecture for the userinterface development and testing environment of FIG. 1 according to oneembodiment of the present invention;

FIG. 6 illustrates various examples of scripting language statementsaccording to one embodiment of the present invention;

FIGS. 7-8 illustrate various examples of meta-data file informationaccording to one embodiment of the present invention;

FIG. 9 illustrates one example of the content of a link database after alink is created between a page and a test script according to oneembodiment of the present invention

FIG. 10 illustrates one example of generating user interface elementsfrom a test case according to one embodiment of the present invention;

FIG. 11 illustrates one example of an object model tree according to oneembodiment of the present invention;

FIG. 12 illustrates one example of compound user interface elementsgenerated from multiple test scripts according to one embodiment of thepresent invention;

FIG. 13 illustrates one example of an original layout tree and amodified layout tree for detecting changes between a test script and auser interface according to one embodiment of the present invention;

FIG. 14 is an operational flow diagram illustrating one example of aprocess for automatically generating and positioning user interfaceelements according to one embodiment of the present invention;

FIG. 15 is an operational flow diagram illustrating one example of aprocess for source and test case linking for automatic updates accordingto one embodiment of the present invention;

FIG. 16 illustrates one example of a cloud computing node according toone embodiment of the present invention;

FIG. 17 illustrates one example of a cloud computing environmentaccording to one embodiment of the present invention; and

FIG. 18 illustrates abstraction model layers according to one embodimentof the present invention.

DETAILED DESCRIPTION

Operating Environment

User interface testing (GUI Testing) is an important step in the processof developing an application such as a website. However, tests that arewritten at the beginning of the development cycle can easily becomeoutdated as the application's code evolves. A change as simple asrenaming a text box can completely break every test that references thetext box. Maintaining these tests is so time consuming that after aperiod the developer or tester may ignore the errors they return orsimply stop running them. The test coverage gap introduced by thispractice allows introduced errors previously covered by tests to gounreported.

FIG. 1 shows one example of an operating environment 100 applicable tovarious embodiments of the present invention. The operating environment100, in one embodiment, comprises one or more user systems 102communicatively coupled to one or more server systems 104 via anetwork(s) 106. The user system(s) 102, in one embodiment, is a personalcomputer, notebook computer, workstation, PDA, cellular phone capable ofbrowsing the Internet, and the like. The network(s) 106, according toone embodiment, comprises a LAN, WAN, World Wide Web, wireless network,or the like.

The user system 102, in one embodiment, comprises a user interface 108,such as a web browser, a mashup, an application, or the like, forinteracting with a development and testing environment (WDTE) 110residing at the server(s) 106. The user interface 108 is referred tofrom hereon in as the “WDTE interface” 102. The WDTE 110, in oneembodiment, is a user interface based environment that does not requireinstallation on the user system 102 and allows users to collaborativelydevelop and store user interfaces (UIs) such as, but not limited to webpages, on a central server 106. The WDTE 110 integrates development andtesting in the same environment and, thus, bridges the gap betweendevelopment and testing.

Even further, as will be shown in greater detail below, the WDTE 110automatically generates user interface elements from test cases writtenin imperative natural language statements. The WDTE 110 parses each lineof the test case, identifies a referenced object type(s) and itsproperties from the parsed line, and adds source code in the source fileof the user interface to generate such element. In addition, the WDTE110 can also infer the hierarchical structure of the elements in theuser interface from the test cases and place them on the user interfaceusing that structure. The WDTE 110 also provides a semi-automatictechnique for test case maintenance by linking test cases with anapplication under test. The WDTE 110 maintains test cases using suchlink and user feed-back. The WDTE 110 takes user input both in linkcreation and conflict resolution.

Development and Testing Environment

The following is a more detailed discussion on the WDTE 110. In oneembodiment, the WDTE 110 represents a test using a scripting languageconfigured for web automation and testing. The WDTE 110 uses a flexibleand simple imperative natural language syntax to specify the actions tobe performed in a web browser as well as conditions for verificationpoints. Table 1, shown in FIG. 6, shows a few examples of scriptinglanguage statements and their description.

The WDTE 110 also lowers the barrier of transforming requirements tocode by generating basic elements of a user interface (e.g., buttons,text boxes, checkboxes, combo-boxes, and other form elements) as well asadvanced JavaScript widgets from imperative natural languagerequirements represented in a scripting language. Additionalprogramming, CSS styling, and drag-and-drop functionality can style theuser interface to completion. The WDTE 110 also improves test casemaintenance as a result of changes in user interface by providing asemi-automatic test case maintenance solution that links test cases withuser interfaces. Once linked, changes to the user interface or testcases are reflected in the other.

One advantage of the WDTE 110 is that it is centered around a commonknowledge artifact (i.e., a scripting language) that is simple to learnand easy to understand. WDTE 110 uses a scripting language forspecification, development, and testing, which can increase easytransfer of knowledge among product managers, designers, developers, andtesters as well as enhance communication in different phases of websitedevelopment. Requirements owners can generate requirements alongsidewebsite design and test cases. Website developers can performtest-driven development and easily execute preliminary testing. Websitetesters can quickly develop and execute detailed testing. The WDTE 110provides a development environment that can streamline the developmentprocess and accelerates time to value through an easier and morecollaborative solution that is suited for all-levels of skilled andnon-skilled developers, making the development easier, faster, and lesscostly.

The WDTE 110, in one embodiment, is built on top of a web basedintegrated development environment (IDE). This IDE supports developmentof web applications using markup languages (e.g., hypertext markuplanguage (HTML), JavaScript, and open source JavaScript such as Dojo.The IDE has support for visual authoring of web sites and editing ofcode. In addition, the IDE also supports features that have becomecommonplace in development IDEs, such as multiple developmentperspectives, web page previews, and design views. The WDTE 110 adds tothe functionality of this IDE, providing the test case editing, testing,test maintenance, and code generation features discussed in greaterdetail below.

Another advantage of the WDTE 110 is that it allows for “coding in thecloud, and hence collaboration. In this embodiment, the WDTE 110 storessource code and workspace information in the cloud. This allowsdevelopers around the world working on the same project to check out notonly the same code, but also the same configuration settings andenvironment. Another inherited benefit is the extreme portability ofWDTE 110 projects. Since they can be accessed from any web browser,users can work alone or with others in nearly any environment withoutthe need for installation or specific hardware. In one embodiment, eachmember of the team uses the same authentication (e.g., a team usernameand a password) so that they share the same team workspace within thecentral repository 502.

FIGS. 2-3 shows various examples of the WDTE as presented to the uservia the WDTE interface 108. As can be seen from FIG. 2, the WDTEinterface 108 presents various components of the WDTE 110 to the user.For example, FIG. 2 shows a file explorer view 202, an editor 204, atest explorer view 206, a test view 208, a results view 210, and aconflict view 302 (FIG. 3) being presented to the user. The fileexplorer view 202 allows users to view source files of user interfacesand open them for editing and testing in the editor 204. The testexplorer 206 view allows users to select tests to run and openindividual tests for editing. Users can also create a new test or deletean existing test from this view.

The test view 208 displays the currently opened test script. Forexample, in FIG. 2 the test script has four test instructions 209, 211,213, 215 (also referred to test lines or test steps). Each testinstruction is represented in a scripting language. Users can run theentire test or each individual step of the test sequentially. Inaddition, the users can also modify the test script or write a testscript from scratch. To help users write test scripts in a scriptinglanguage, the WDTE 110 also displays example scripting languageinstructions as users start writing a test step. For example, if userstarts typing “enter”, the WDTE 110 shows the possible scriptinglanguage syntax 402 that starts with “enter”, as illustrated in FIG. 4.Additional buttons 217 also allow the user to generate user interfaceselements from a test script, and link a test script with a userinterfaces for test case maintenance.

The results view 210 displays the results (Success or Failure) of theprevious test run. In case of a failure, the results view 210 alsodisplays the reason of the failure. Users can interact with this viewby, for example, clicking on a failed test takes the user to theinstruction in the script that caused the test to fail. The conflictview 302, shown in FIG. 3, shows the conflicts between user interfaceselements and test case steps when there is a change in either a linkeduser interfaces or test case. Users can resolve conflicts from this viewand, thus, can maintain test cases.

FIG. 5 shows a more detailed view of the WDTE 110 architecture accordingto one embodiment of the present invention. In particular, FIG. 5 showsthat the WDTE 110 is coupled to the WDTE interface 108 and a centralrepository 502. The WDTE 110 comprises a scripting language test engine504, a generator 506, a linking module 508, and a scripting languageparser 510. The WDTE interface 108 reads and writes to the server-sidefile system, which is shown in FIG. 2 as the central repository 502. Thecentral repository 502 stores source files for user interfaces, testscripts, and several other files containing meta-data and mappings.FIGS. 7-9 show examples of such meta-data and mappings. FIG. 9 furthershows a mapping that is created after a test is linked with a userinterface. In one embodiment, users register with the WDTE 110 and areverified via one or more authentication mechanisms. This allows the WDTE110 to set up a workspace for that user in the repository 502.

The WDTE interface 108 interprets and displays markup files such as, butnot limited to, HTML files (which can include JavaScript) and allows theuser to edit and interact with user interfaces such as, but not limitedto, web pages. The WDTE interface 108 also allows users to create,update, and delete operations on test cases. Users can also invoke otherWDTE 110 features such as generating user interface elements from testcases and linking test cases with user interfaces for test casemaintenance.

The scripting language parser 510 receives and parses a test script 511.The scripting language parser 510 then outputs a parsed object for eachline of the script 511. Each such parsed object comprises the type ofaction, type of the object, and optionally an object label and a value.For example, the instruction “click the ‘log in’ button” is parsed intothe following information: {Action Type: click, Object Type: button,Object Label: “log in”}.

The scripting language test engine 504 takes such parsed objects, andanalyzes the Document Object Model (DOM) of the user interface 513 tofind the desired element. To find a match, the scripting language testengine 504 compares the object type and object label of the parsedobject with those of the elements from the user interface 513. When asuccessful match is identified the scripting language test engine 504executes the instruction (e.g., the scripting language test engine 504clicks on a button or enters text). However, if a successful match isnot identified, the instruction is not executed and the test fails. Theresult of the test is a “Success” if all such instructions aresuccessful; otherwise the result is a “Failure”. After a test run, thereason for each failure (e.g., parsing error, could not find the “foo”button) is also displayed in the results view 210.

The generator 506 takes a test script 511 as input, and generates userinterface elements referenced from the instructions in that test script511. Users trigger this component by selecting an associated toolbaroption from the WDTE interface 108. The generator 506 takes the currenttest script 511 and the user interface 513 opened in the WDTE interface108 as input and generates the elements on the user interface 513. Togenerate a specific user interface element, the WDTE 110, in onembodiment, uses standard HTML tags, as well as basic properties andrules for generating those properties of that element stored in themeta-data file (built a priori) in the repository 502. Table 2 in FIG. 7shows one such example.

If a user interface is not currently opened, the generator 506 creates anew user interface. The generator 506 invokes the scripting languageparser 510 to parse the test script 511, and identifies the action name,object type, object label, and value from each of the parsedinstructions, i.e. steps of the script. If the element referenced froman instruction already exists on the user interface 513, the generator506 does not generate it; otherwise the generator 506 generates thatelement on the user interface. In addition, the generator 506 alsoinfers the hierarchical position of the generated elements from the testscript and places them according to that structure.

The linking module 508 allows a user to link a user interface to a testcase. When a link is established between a test case and the userinterface, a mapping from each test line to the corresponding referencedelement in the user interface 513 is generated and stored in a linkdatabase in the repository 502. For example, Table 4 in FIG. 9 shows onesuch mapping. When linked sources (i.e. a test case or the userinterface) are modified test failures are automatically identified,added to a conflict database in the repository 502, and presented to theuser using through the WDTE interface 108, as shown in the conflict view302 of FIG. 3. This allows the user to easily batch modify files forcompliance and, thus, maintain test cases.

Automatic Generation and Positioning of User Interface Elements

As discussed above, the WDTE 110 automatically generates and positionuser interface elements (e.g., buttons, textboxes, etc.) from testscripts. The WDTE 110 takes one or more test scripts 511 as input, andgenerates the user interface elements referenced by the testinstructions in those scripts 511. Each line of the test script 511 isparsed to determine the object type (e.g. a button), object property(e.g. the label “foo”), etc. For each such parsed line, the WDTE 110tries to find the referenced element in the user interface 513. If theelement is found, the WDTE 110 does not generate the element. However,the WDTE 110 temporally stores a reference to this element to allowsubsequent elements that are associated with this element to begenerated with the correct position in the user interface 513. If theelement is not found in the user interface 513, the WDTE 110 creates theelement by adding source code to the source file of the user interface513 for creating that element. To generate such source code, the WDTE110 interacts with the meta-data file stored in the repository 502.Table 2 shown in FIG. 7 gives examples of such meta-data files. Forexample, to create an HTML button, the WDTE 110 uses the following code:<input type=“button”>.

For each user interface element, the meta-data file also stores a set ofproperties and rules to associate each property with the object propertyfrom parsed test instruction. Meta-data values are assigned to thegenerated element/widget when the parser 510 parses such a meta-datavalue(s) from the test instruction. For example, if the parser 510identifies that the label of the button is “My Button”, then the WDTE110 associates the label property of the generated button with “mybutton”. In one example, the generated source is as follows: <label>MyButton</label><input type=“button”/>. In another example, generating acheckbox from the scripting language instruction “turn on the “color”checkbox” adds the following source: <label>color</label><inputtype=“checkbox” value=“color” checked>. Here, the rules to associate thevalue property of the generated checkbox with the parsed object propertyare maintained in the repository 502.

The WDTE 110 creates three different categories of user interfaceelements: simple elements, compound elements, and elements withsub-elements. Simple elements are regular elements that can include allof their referenced properties. For example, an element “click the ‘foo’button” creates a button with label “foo”. Compound elements includespecific elements that require additional elements to be created tostore a meta-data value referenced in a test instruction. A textboxelement does not have an inherent label property, but a label may existin the object property parsed from the test instruction. For example,the test line “enters ‘foo’ into the ‘User Name’ textbox” creates a textelement with the content “User Name” and inserts this content before thegenerated textbox element. Here the purpose of the text element is tovisually display the label property of the adjacent textbox.

Elements with sub-elements are advanced elements that are composed ofseveral sub elements, e.g. Accordion and Tab containers, or a drop-downmenu. These elements are generated using references to existing elementson the user interface. For example a listbox can have multiple itemsthereon. Once the WDTE 110 generates the first item on the list, therest of the items do not generate the listbox again. Instead, they addnew items to the already generated listbox. For example, performing thisprocess for the test script 1002 shown in the top portion of FIG. 10generates the user interface elements 1004 shown in the bottom portionof FIG. 10.

The user interface elements generated by the WDTE 110 are separated intotwo groups (or positioning types): layout elements and non-layoutelements. Layout elements do not interact with input or outputsassociated with the user, but are instead used to arrange other elementsin the user interface. The Accordion Container, Layout Container, andPageTab are examples of such elements. Non-layout elements are composedof elements that are not used to arrange other elements, but are usedfor interacting with users. For example, buttons, textboxes, lists andnumber spinners are examples Non-Layout elements.

The first element in a test case is positioned on the user interfaceirrespective of other elements since no other elements have beengenerated at this point. From the subsequent generated element, the WDTE110 uses four basic cases to identify how to position the element. Thesecases are: Layout-Layout, Layout-NonLayout, NonLayout-Layout, andNonLayout-NonLayout. If the previously generated element is a Layoutelement (e.g. a tab) and the current element is also a Layout element(e.g. a container), then the MDTE 110 looks at the meta-data file in therepository 502, which stores a structural relationship(s) between layoutelements. For example, Table 3 in FIG. 8 shows example of one suchmeta-data file. If there is no such relationship between these twosubsequent elements, the MDTE 110 places them independent of one anotherin the user interface. Otherwise the MDTE 110 follows the relationshipspecified in the meta-data file to put them in the user interface.

However if the previous element is a Layout element and the currentelement is a NonLayout element, the current element is placed as a childof the previous element. If the previous element is a NonLayout elementand the current element is a Layout element, then all the subsequentNonLayout elements are placed as a child of the current Layout elementuntil another Layout element is detected. If the previous element is aNonLayout element and the current element is also a NonLayout elementthen there are two cases depending on if the previous NonLayout elementhas a Layout parent element. If the previous NonLayout element has aLayout parent element, then the current NonLayout element is also placedas a sibling of the previous NonLayout element. Otherwise the currentNonLayout element is placed independently of the previous NonLayoutelement.

The above approach, in one embodiment, forms an object model tree (e.g.A DOM tree for HTML) representing the user interface from the test case.FIG. 11 shows an object model tree 1102 of a user interface that hasbeen constructed from a test case. In particular, the object model tree1102 shown in FIG. 11 is associated with advanced elements. Usually,advanced elements are containers inside a list of multiples containers.Based on the fact that these advanced elements are to be part of a groupof elements of the same type, the WDTE 110 predicts the position of anadvanced element based on the history of other elements already created.If a member of this type of element has already been created, the WDTE110 joins this new element with the existing container. If not, the WDTE110 follows the steps above and creates the new element. For example, aContent Pane can be placed inside an Accordion-Container. If there isalready an Accordion-Container and a Content Pane created, and theContent-Pane is placed as a child of the Accordion-Container and if thecurrent element is also a Content-Pane, then the current element isplaced as a sibling of the other Content-Pane (i.e. as a child of theAccordion-Container).

The WDTE 110 can also generate complex user interfaces from multiplesources as well. For example, the WDTE 110 creates temporary anchorsbetween shared elements to generate a combined requirements list incorrect order. Since different test cases take different paths through auser interface (e.g. a web page), additional knowledge of the elementson the user interface can be obtained. For example, FIG. 12 shows oneexample of a flight tracker web page 1202 that includes two select boxes1204, 1206 listing cities.

One script can include the steps, “Select ‘Albany, N.Y.’ from the‘Select the Departure City:’ selectbox”, “Select ‘Albuquerque, N. Mex.’from the ‘the Arrival City or Flight number:’ selectbox”. Another scriptcan include the steps, “Select ‘Austin, Tex.’ from the ‘Select theDeparture City:’ selectbox”, “Select ‘Amarillo, Tex.’ from the ‘Selectthe Arrival City or Flight number:’ selectbox”. From these two scriptsthe WDTE 110 can generate a ‘Select the Departure City:’ select box thatincludes two options; ‘Albany, N.Y.’ and ‘Austin, Tex.’. The WDTE 110can also generate a ‘Select the Arrival City or Flight number:’selectbox that includes two options; ‘Albuquerque, N. Mex.’ and‘Amarillo, Tex.’. This is much more useful than a select box with onlyone option. In testing one usually wants to test every path through auser interface. If all of the test cases are written before hand from arequirements document then every option and path through the userinterface should be known and can be automatically generated.

Source and Test Case Linking for Automatic Updates

In addition to automatically generating and positioning user interfaceelements, the WDTE 110 can also provide semi-automatic test casemaintenance by creating links between test case instructions, the sourcecode of a user interface, and interactive user feedback to resolveconflict. The WDTE 110 allows interactive link creation between testsand source code and interactive conflict resolution by allowing users tospecify links between tests and user interfaces. When such a link isestablished between a test case and the user interface, a mapping froman element referenced by test instructions and those in the userinterface is created by matching each element in the user interface witha corresponding reference in the test script (e.g., matching a propertyof an element in the user interface with a corresponding propertyreference in the test script). Such mapping and user feedback is used tomaintain test cases when the application under test (AUT) changes. Whenlinked sources are modified, the WDTE 110 automatically identifies testfailures and presents these failures to the user. This allows the usersto easily batch modify files for compliance. This process streamlinesthe time consuming process of updating multiple files that depend on onefile.

In one embodiment, one or more users create a link between a userinterface and a test script via the WDTE interface 108. A user interfacecan be linked with any number of test scripts and a test script can alsobe linked with any number of user interfaces. When a link is establishedbetween a test script 511 and the user interface 513, the test engine504 runs the specified test on the specified user interface 513. As thetest is run each line of the test is matched to the element that itreferences and a mapping from each test line to the correspondingmatched element is established. For example, creating a link between thetest script and the user interface shown in FIG. 2 results in themapping entries shown in Table 4 (FIG. 9) being created. The mappinginformation is stored in the link database file in the repository 502.

Once a link is established between a user interface 513 and a testscript 511, the linking module 508 is notified whenever a change takesplace either in the source file of the user interface 513 or in the testscript 511. The following changes can occur with respect to the sourcefile of the user interface 513: Element added, Element deleted, andElement updated. The linking module 508 detects an Element added/deletedchange by comparing the Layout trees 1302, 1304 of current and previoussource files, where a layout Tree of a source file is a rendering of theelements of that source file. FIG. 13 shows one such example of anoriginal layout tree 1302 and a modified layout tree 1304.

An Element updated change can be identified when changes are made to thesource file of the user interface, but the layout tree does not change.When an addition of an element is detected by the linking module 508, aline is added to the conflict view 302 stating that the element on theuser interface is not tested. For update of an element, all linked testlines are run against the changed file. If a test line fails, theproblem is recorded to the conflict database and displayed in theconflict view 302. When the conflict is resolved, the link database isupdated with the element that allows the test to pass. For the deletionof an element, all test lines linked to the removed element are added tothe conflict database and shown in the conflict view 302. If the changeis rolled back by the user, the element is re-added to the page. If thechange is accepted by the user, the test lines are deleted.

The following changes can occur in the test script: Test Line Inserted,Test Line Deleted and Test Line Updated. The linking module 508 candetect these changes by comparing the current and previous versions ofthe script files. When a test line is inserted, the test engine 504 runsa test against the source of all linked user interfaces. A new entry iscreated in the link database with the line information. If the linefails the conflict is added to the conflict view 302 and the entry inthe link database is updated with place holder data. If the linesucceeds the link is updated with the element that allowed the test topass. A deletion of a test line results in an error to be added to theconflict database to remind the user that the element linked to the lineis now untested. When a test line is updated, the link database isqueried to determine if a conflict has been created. If a conflict iscreated, it is added to the conflict database and displayed in theconflict view 302. If there was no conflict, the link database isupdated to reflect the new contents of the line.

The conflict view 302 shows all the conflicts detected for the currentproject. For example, FIG. 3 shows an example of a conflict view 302 asa result of a modification of the file FrontPage.html. As a result ofrenaming a button in this web page, its linked test script fails. Userscan modify each of such affected files so that the tests for the webpages now pass. For example in FIG. 3, a user may select “Change All”.which updates the test lines of “Login.clr” with modified button label.As a result, the test passes again. This is one example of how users mayvisualize and resolve conflict as a result of changes in user interfacesor test scripts and, thus, maintain test cases.

Operational Flow Diagrams

Referring now to FIGS. 14-15, the flowcharts and block diagrams in theFigures illustrate the architecture, functionality, and operation ofpossible implementations of systems, methods, and computer programproducts according to various embodiments of the present invention. Inthis regard, each block in the flowchart or block diagrams may representa module, segment, or portion of code, which comprises one or moreexecutable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

FIG. 14 is an operational flow diagram illustrating one overview of aprocess for automatically generating and positioning user interfaceelements. It should be noted that a more detailed discussion withrespect to this process has already been given above with respect toFIGS. 1-12. The operational flow of FIG. 14 starts at step 1402 andflows directly into step 1404. The WDTE 110, at step 1404, receives atleast one test script 511 as in input. The WDTE 110, at step 1406,generates the user interface elements referenced by the testinstructions in the test script 511. The WDTE 110, at step 1408, parseseach line of the test script to determine at least one of the objecttype and object property referenced therein.

The WDTE 110, at step 1410, identifies, for each parsed line, thereferenced element in the user interface 513. The WDTE 110, at step1412, determines if an element was found. If the result of thisdetermination is positive, the WDTE 110, at step 1414, does not generatethe element. If all elements have been found, the control flow thenexits at step 1416. However, if the result of the determination at step1412 is negative, the WDTE 110, at step 1418, generates the element(s)by adding source code to the source file of the user interface. The WDTE110, at step 1420, then positions the generated element(s) on the userinterface 513 based on a positioning type associated with the element.The control flow then exits at step 1422.

FIG. 15 is an operational flow diagram illustrating one overview of aprocess for source and test cases for automatic updates. It should benoted that a more detailed discussion with respect to this process hasalready been given above with respect to FIGS. 1-5 and 13. Theoperational flow of FIG. 15 starts at step 1502 and flows directly intostep 1504. The WDTE 110, at step 1504, determines that a user hascreated a link between a user interface 513 and a test script 511. TheWDTE 110, at step 1506, runs the test specified in the test scriptagainst the user interface 513. The WDTE 110, at step 1508, matches eachline of the test to the user interface element that it references.

The WDTE 110, at step 1510, establishes a mapping from each test line tothe corresponding matched user interface element. The WDTE 110, at step1512, monitors for changes between the user interface 513 and the testscript 511. The WDTE 110, at step 1514, determines if a change has beendetected. If the result of this determination is negative, the WDTE 110continues to monitor for changes. However, if the result of thisdetermination is positive, the WDTE 110, at step 1516, notifies the userof the detected change(s). The control flow then exits at step 1518.

Information Processing System

Referring now to FIG. 16, a schematic of an example of an informationprocessing system 1600 such as the server system 104 of FIG. 1. In oneembodiment, the information processing system 1600 is a cloud computingnode. Cloud computing node 1600 is only one example of a suitable cloudcomputing node and is not intended to suggest any limitation as to thescope of use or functionality of embodiments of the invention describedherein. Regardless, cloud computing node 1600 is capable of beingimplemented and/or performing any of the functionality set forthhereinabove.

In the cloud computing node 1600 there is a computer system/server 1602,which is operational with numerous other general purpose or specialpurpose computing system environments or configurations. Examples ofwell-known computing systems, environments, and/or configurations thatmay be suitable for use with computer system/server 1602 include, butare not limited to, personal computer systems, server computer systems,thin clients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 1602 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 1602 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 16, computer system/server 1602 in cloud computing node1600 is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 1602 may include, but are notlimited to, one or more processors or processing units 1604, a systemmemory 1606, and a bus 1608 that couples various system componentsincluding system memory 1606 to processor 1604.

Bus 1608 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnects (PCI) bus.

Computer system/server 1602 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 1602, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 1606, in one embodiment, comprises the WDTE 110 and itscomponents. The WDTE 110 can also be implemented in hardware as well.The system memory 1606 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1610 and/orcache memory 1612. Computer system/server 1602 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 1614 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 1608 by one or more datamedia interfaces. As will be further depicted and described below,memory 1606 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 1616, having a set (at least one) of program modules1618, may be stored in memory 1606 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. Program modules 1618 generally carry outthe functions and/or methodologies of embodiments of the invention asdescribed herein.

Computer system/server 1602 may also communicate with one or moreexternal devices 1620 such as a keyboard, a pointing device, a display1622, etc.; one or more devices that enable a user to interact withcomputer system/server 1602; and/or any devices (e.g., network card,modem, etc.) that enable computer system/server 1602 to communicate withone or more other computing devices. Such communication can occur viaI/O interfaces 1624. Still yet, computer system/server 1602 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 1626. As depicted, network adapter1626 communicates with the other components of computer system/server1602 via bus 1608. It should be understood that although not shown,other hardware and/or software components could be used in conjunctionwith computer system/server 1602. Examples, include, but are not limitedto: microcode, device drivers, redundant processing units, external diskdrive arrays, RAID systems, tape drives, and data archival storagesystems, etc.

Cloud Environment

It is understood in advance that although the following is a detaileddiscussion on cloud computing, implementation of the teachings recitedherein are not limited to a cloud computing environment. Rather, variousembodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed. For example, various embodiments of the presentinvention are applicable to any computing environment with a virtualizedinfrastructure or any other type of computing environment.

For convenience, the Detailed Description includes the followingdefinitions which have been derived from the “Draft NIST WorkingDefinition of Cloud Computing” by Peter Mell and Tim Grance, dated Oct.7, 2009, which is cited in an IDS filed herewith, and a copy of which isattached thereto. However, it should be noted that cloud computingenvironments that are applicable to one or more embodiments of thepresent invention are not required to correspond to the followingdefinitions and characteristics given below or in the “Draft NISTWorking Definition of Cloud Computing” publication. It should also benoted that the following definitions, characteristics, and discussionsof cloud computing are given as non-limiting examples.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 17, illustrative cloud computing environment 1702is depicted. As shown, cloud computing environment 1702 comprises one ormore cloud computing nodes 1600 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 1704, desktop computer 1706, laptop computer1708, and/or automobile computer system 1710 may communicate. Nodes1704, 1706, 1708, 1710 can communicate with one another. They may begrouped (not shown) physically or virtually, in one or more networks,such as Private, Community, Public, or Hybrid clouds as describedhereinabove, or a combination thereof. This allows cloud computingenvironment 1702 to offer infrastructure, platforms and/or software asservices for which a cloud consumer does not need to maintain resourceson a local computing device. It is understood that the types ofcomputing devices 1704, 1706, 1708, 1710 shown in FIG. 17 are intendedto be illustrative only and that computing nodes 700 and cloud computingenvironment 1702 can communicate with any type of computerized deviceover any type of network and/or network addressable connection (e.g.,using a web browser).

Referring now to FIG. 18, a set of functional abstraction layersprovided by cloud computing environment 1702 (FIG. 17) is shown. Itshould be understood in advance that the components, layers, andfunctions shown in FIG. 18 are intended to be illustrative only andembodiments of the invention are not limited thereto. As depicted, thefollowing layers and corresponding functions are provided:

Hardware and software layer 1802 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® System Z® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM System P® systems; IBMSystem X® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide)

Virtualization layer 1804 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 1806 may provide the functionsdescribed below. Resource provisioning provides dynamic procurement ofcomputing resources and other resources that are utilized to performtasks within the cloud computing environment. Metering and Pricingprovide cost tracking as resources are utilized within the cloudcomputing environment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provide pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA.

Workloads layer 1808 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; transactionprocessing; automatic generation and positioning of user interfaceelements, and source and test case linking for automatic updates, asdiscussed above.

NON-LIMITING EXAMPLES

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A method, comprising: determining that a link hasbeen created between a user interface and at least one test script,wherein the test script comprises a set of test instructions, andwherein the user interface comprises a set of user interface elements;executing each test instruction in the set of test instructions againstthe user interface; identifying, based on the executing and for each ofthe set of test instructions, at least one of the set of user interfaceelements referenced by the test instruction; generating, during theexecution of each test instruction and based on the identifying, a setof mapping information for each of the set of test instructions, whereinthe set of mapping information identifies an association between thetest instruction and the at least one of the user interface elements;determining that a change has occurred in at least one of the userinterface and the test script; based on a change having occurred to theuser interface, identifying at least one test instruction affected bythe change to the user interface based on the set of mappinginformation; and based on a change having occurred to the test scriptafter execution of the test script has completed, identifying at leastone user interface element affected by the change to the test scriptbased on the set of mapping information.
 2. The method of claim 1,further comprising: determining that the change conflicts with at leastone of the test instruction and the user interface element; andnotifying a user, via a user interface, that the change conflicts withat least one of the test instruction and the user interface element,wherein the notifying comprises at least displaying to the user thechange that has occurred and the at least one of the test instructionand the user interface element that has been affected by the change. 3.The method of claim 1, wherein detecting a change to the user interfacecomprises: comparing a first layout tree associated with the userinterface with a second layout tree associated with a new version of theuser interface; and determining, based on the comparing, that at leastone new user interface element has been added to the user interface. 4.The method of claim 3, further comprising: notifying a user that newuser interface element is currently not being tested.
 5. The method ofclaim 1, wherein detecting a change to the user interface comprisesdetermining that at least one user interface element in the set of userinterface elements has been updated, wherein the method furthercomprises: executing each test instruction in the set of testinstructions against the user interface including the user interfacethat has been updated; and notifying, based on the executing, a user ofany test instruction in the set of test instructions that fails as aresult of the user interface that has been updated.
 6. The method ofclaim 1, wherein detecting a change to the user interface comprises:comparing a first layout tree associated with the user interface with asecond layout tree associated with a new version of the user interface;determining, based on the comparing, that at least one user interfaceelement has been deleted from the user interface; identifying, based onthe set of mapping information, at least one test instruction in the setof test instructions that is associated with the user interface elementthat has been deleted; and notifying, based on the identifying, a userof the test instruction that has been identified.
 7. The method of claim1, wherein detecting a change to the test script comprises: comparing afirst file associated with the test script with a second file treeassociated with a new version of the test script; and identifying atleast one difference between the first file and the second file.
 8. Themethod of claim 1, further comprising: determining that the change tothe test script is that a new test instruction has been inserted intothe test script; identifying, based on the set of mapping information,the user interface associated with the test script; executing the testscript including the new test instruction against the user interfacethat has been identified; determining, based on the executing, whether aconflict has occurred between the new test instruction and at least oneuser interface element in the set of user interface elements; based on aconflict having occurred, notifying a user of that the new testinstruction created a conflict; and based on the test instruction havingbeen performed successfully, updating the set of mapping information toindicate which of the user interface elements allowed the new testinstruction to be performed successfully.
 9. The method of claim 1,further comprising: determining that at least one test instruction inthe set of test instructions has been updated; querying the set ofmapping information to determine if the test instruction that has beenupdated creates a conflict with at least one user interface element inthe set of user interface elements; based on the test instruction thathas been updated conflicting with the user interface element, notifyinga user of the conflict; and based on the test instruction that has beenupdated not conflicting with the user interface element, updating theset of mapping information to include the test instruction that has beenupdated.
 10. The method of claim 1, further comprising: determining thatat least one test instruction in the set of test instructions has beendeleted; identifying, based on the set of mapping information, at leastone user interface element in the set of user interface elementsassociated with the test instruction that has been deleted; andnotifying a user that the user interface element that has beenidentified is being prevented from being tested as a result of the testinstruction having been deleted.